const qs = require("querystring")
let str = ""

const appendStr = (req,res,next)=>{
      
    req.on("data",(chunk)=>{
        str +=chunk
    })
    req.on("end",()=>{
     //    console.log(str);
        const body = qs.parse(str)
        req.body = body
        next()
    })
  
}
module.exports = appendStr